package com.engine.cn.juc;

public class ThreadTest {
    static class CustomThread extends Thread {
        @Override
        public void run() {
            System.out.println("继承Thread启动了一个练习线程");
        }
    }

    static class CustomRunnable implements Runnable {

        @Override
        public void run() {
            System.out.println("实现Runnable启动了一个练习线程");
        }
    }

    public static void main(String[] args) {
        new CustomThread().start();
        new Thread(new CustomRunnable()).start();
        new Thread(() -> {

        }).start();
    }
}
